Skip to content

Conversation

@bminnix
Copy link
Contributor

@bminnix bminnix commented Nov 10, 2025

Adding a mapping for LibreNMS values to network_driver values for the initial values in use.

itdependsnetworks and others added 30 commits June 15, 2022 16:29
* initial pass at type hinting and getting mypy to run

* update tasks and ci to do mypy as well

* rm unused import

* fix contributing end-line number

* fix contributing end-line number

* Add py.typed file to signify availability of type hints to third parties.

* Updates to type hinting.

* Add EOS _build_banner type hints.

* Address feedback.

* Linting.

* Remove .idea from commit and ignore in .gitignore.

* Remove remnants of merge conflict.

* PR feedback.

* PR comments.

* Ignore pylint errors for abstract-method.

* Black.

* add examples and better exception messaging

Co-authored-by: Leo Kirchner <[email protected]>
* prep for 1.2.0 release

* Update CHANGELOG.md

Co-authored-by: Jeff Kala <[email protected]>

Co-authored-by: Jeff Kala <[email protected]>
* Updated lib mapping docs (networktocode#113)

* Updated lib mapping docs

* Updated per review suggestions

* Pinned mistune for m2r2 (networktocode#114)

* Switch to poetry-core

* Update banner parsing for EOS (networktocode#121)

Update banner parsing for EOS

* Fixes encrypt type7 (networktocode#122)

* fixes encrypt type7

* Document support on duplicate lines (networktocode#128)

* Few updates to PR of 125 (networktocode#129)

* initial pass at type hinting and getting mypy to run

* update tasks and ci to do mypy as well

* rm unused import

* fix contributing end-line number

* fix contributing end-line number

* Add py.typed file to signify availability of type hints to third parties.

* Updates to type hinting.

* Add EOS _build_banner type hints.

* Address feedback.

* Linting.

* Remove .idea from commit and ignore in .gitignore.

* Remove remnants of merge conflict.

* PR feedback.

* PR comments.

* Ignore pylint errors for abstract-method.

* Black.

* add examples and better exception messaging

Co-authored-by: Leo Kirchner <[email protected]>

* Adding nxos_ssh to Napalm mapper (networktocode#138)

* Update CODEOWNERS (networktocode#134)

adding codeowner

* prep for 1.2.0 release (networktocode#143)

* prep for 1.2.0 release

* Update CHANGELOG.md

Co-authored-by: Jeff Kala <[email protected]>

Co-authored-by: Jeff Kala <[email protected]>

Co-authored-by: Adam Byczkowski <[email protected]>
Co-authored-by: Fabian Affolter <[email protected]>
Co-authored-by: Ken Celenza <[email protected]>
Co-authored-by: Dr. X <[email protected]>
Co-authored-by: Leo Kirchner <[email protected]>
Co-authored-by: Joe Wesch <[email protected]>
Co-authored-by: Andrew Bates <[email protected]>
* adds utility functions ios

* addresses comments

* addresses comments

* adds tests

* addresses comments

* addresses comment parametrize tests
…ocode#148)

Adds get_oui and flat ci process to pull OUI data into repo (networktocode#148)

Co-authored-by: Jeff Kala <[email protected]>

Co-authored-by: Adam Byczkowski <[email protected]>
Co-authored-by: flat-data <[email protected]>
Co-authored-by: Jeff Kala <[email protected]>
Co-authored-by: Ken Celenza <[email protected]>
Co-authored-by: Jeff Kala <[email protected]>
* feat: Add parser for Citrix NetScaler

* test: ✅ Add compliance tests for NetScaler

* docs: 📝 Update docs to add NetScaler parser to list

* test: ✅ Add tests for cmdPolicy and ssl features

* docs: 📝 Add documentation around parent/child missing in NS parser

* docs: 📝 Fix indentation in documentation

* revert: Revert indentation

* revert: Revert deleted empty line

Co-authored-by: Justin Drew <[email protected]>
* Change how dunder version is created

* Ignore mypy on metadata 3.8 issues
* Update OUI mappings manually

* Flat: latest data (2022-11-04T19:25:07.118Z)
{
  "date": "2022-11-04T19:25:07.118Z",
  "files": [
    {
      "name": "netutils/oui_mappings.py",
      "deltaBytes": 9540,
      "source": "https://standards-oui.ieee.org"
    }
  ]
}

* Revert workflow file

* Fix workflow comment spacing

Co-authored-by: Adam Byczkowski <[email protected]>
Co-authored-by: flat-data <[email protected]>
* feat: Adds is_classfull

is_classful will check if IP network strings fall within class boundaries.

Fixes networktocode#157

* docs: Corrects method description.

Co-authored-by: Adam Byczkowski <[email protected]>

* style: Corrected formatting

* docs: Corrects documentation style

* doc: Update documentation based on feedback.

Co-authored-by: Jeff Kala <[email protected]>

* fix: Fixed is_classfull missing from jinja filter list

* docs: Added better example of ip_classfull usage

* docs: Added ignore for pydocstyle

Using escaped quotes in pydocs is, apparently, frowned upon and flagged by pydocstyle D300 and D301. However, in the ip_classfull example, the escaped double quotes are for triple double quotes. Removing the backslashs and making the pydoc a raw string won't work, the backslashes still have to be there. Therefore, we're ignoring D300 and D301 in this case.

* docs: Updated auto-generated docs

Co-authored-by: Adam Byczkowski <[email protected]>
Co-authored-by: Jeff Kala <[email protected]>
* add aruba to config parser

* fix config parsing

* remove unneeded line

* add scrapli lookup mapper

* aruba parser updates

* add aruba_aoscx lib_mapper

* Update netutils/config/parser.py

Co-authored-by: Jeff Kala <[email protected]>

* update test case

Co-authored-by: lukebates123 <[email protected]>
Co-authored-by: Jeff Kala <[email protected]>
* Minor updates

fix classfull address naming in ip.py

* PR#networktocode#173 Fix classful naming

* fixing broken tests
jeffkala and others added 13 commits September 5, 2025 10:51
* initial at running config mapper updates

---------

Co-authored-by: itdependsnetworks <[email protected]>
{
  "date": "2025-10-01T02:32:30.453Z",
  "files": [
    {
      "name": "netutils/data_files/oui_mappings.py",
      "deltaBytes": 6850,
      "source": "https://standards-oui.ieee.org"
    }
  ]
}

Co-authored-by: flat-data <[email protected]>
{
  "date": "2025-10-01T02:37:17.366Z",
  "files": [
    {
      "name": "netutils/data_files/protocol_mappings.py",
      "deltaBytes": -161,
      "source": "https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv"
    }
  ]
}

Co-authored-by: flat-data <[email protected]>
@@ -1,4 +1,5 @@
"""Dictionary object to store OUI information."""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be needed, and will likely get reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file are coming from ruff rules. I was just following ruff --fix after I realized there was an issue called out by ruff.

@itdependsnetworks
Copy link
Contributor

Can you link source of this information for ease of future findings?

@bminnix
Copy link
Contributor Author

bminnix commented Nov 10, 2025

Can you link source of this information for ease of future findings?

I'm not sure the best way to go about doing this since there really isn't a great summarized source, suggestions welcomed.

In the current state this is all coming about as follows:

  1. The "constants.py" file is created with "os_manufacturer_map" and "manufacturer_os_map" (both manually created (by @bile0026) after inspecting the files/contents) with the intent to create those specific mappings. All values from the LibreNMS code/base are in this os/manufacturer mapping.

  2. The non-driver values being added to the LIBRENMS_LIB_MAPPING/REVERSE are ones coming in directly from the devices themselves and being used to map to/from the nautobot network drivers. I believe these device values obtained are all SNMP value based (and how LibreNMS is obtaining device data).

  3. The values in LIB_MAPPER dictionaries are just added after seeing the values that were provided by the devices, and any that throw "Manufacturer mapping not found for OS" get added to the mapping then.

We could go through and try to add a mapping entry for each of the os/manufacturer entries, but there really isn't any great source of info for future findings/requirements.

@jeffkala
Copy link
Collaborator

Think you'll need to add a bit to the development_script to to make sure proper doc tables are auto generated since this is a new mapping.

@bminnix bminnix force-pushed the blm/librenms_lib_mapping branch from 9869d30 to f9b292b Compare January 5, 2026 15:50
@bminnix
Copy link
Contributor Author

bminnix commented Jan 5, 2026

Think you'll need to add a bit to the development_script to to make sure proper doc tables are auto generated since this is a new mapping.

This is done. I had ran the script but forgot to update it first 😬

Comment on lines +148 to +156
# LibreNMS | Normalized
LIBRENMS_LIB_MAPPER_REVERSE = {
"arista_eos": "arista_eos",
"iosxe": "cisco_xe",
"iosxr": "cisco_xr",
"nxos": "cisco_nxos",
"junos": "juniper_junos",
"procera": "applogic_procera",
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# LibreNMS | Normalized
LIBRENMS_LIB_MAPPER_REVERSE = {
"arista_eos": "arista_eos",
"iosxe": "cisco_xe",
"iosxr": "cisco_xr",
"nxos": "cisco_nxos",
"junos": "juniper_junos",
"procera": "applogic_procera",
}
# Normalized | LibreNMS
LIBRENMS_LIB_MAPPER_REVERSE = {
"arista_eos": "arista_eos",
"cisco_xe": "iosxe",
"cisco_nxos": "nxos",
"cisco_xr": "iosxr",
"juniper_junos": "junos",
"applogic_procera": "procera",
}

These are in reverse of what they should be, e.g. juniper_junos is normalized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The below needs to be flipped as well

"cisco_nxos": "nxos",
"cisco_xr": "iosxr",
"juniper_junos": "junos",
"applogic_procera": "procera",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this have ssh and be in netmiko? If so, let's try and reserve the name there, if not we need to add it to _MAIN_LIB_MAPPER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.